<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no" />
    <title>商品详情</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-slide.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css"/>
    <style>
        .aui-bar-nav{
            background-color: white;
            color: black;
        }
    </style>
</head>
<body>

<div class=" " id="goodInfo-content">

</div>

<script id="goodInfo-template" type="text/x-dot-template">


    <header>
        <div class="slide">
            <div id="aui-slide">
                <div class="aui-slide-wrap" >
                    <div class="aui-slide-node ">
                    <img src="{{=it.goods_img}}" />
                    </div>
                </div>
                <div class="aui-slide-page-wrap"></div>
            </div>
        </div>
    </header>
<div class="aui-content">
    <ul class="aui-list-view">
        <li class="aui-list-view-cell aui-img" >
            <div class="aui-img-body">
                <div class="aui-ellipsis-2 "><h5 class="font-black">{{=it.goods_name}}</h5></div>
            </div>
        </li>
        <li class="aui-list-view-cell aui-flex-col" >
            <div class="aui-flex-item-6 " >
                <p class=" font-size-12 aui-pull-left aui-margin-t-5 text-line-through">￥{{=it.market_price}}</p>
                <span class=""><h1 class="font-weight-700 aui-text-danger">￥{{=it.shop_price}}</h1></span>

            </div>
            <div class="aui-flex-item-6 aui-text-right">
                <h6>已有{{=it.sales_volume_base}}人付款</h6>
            </div>
        </li>
    </ul>
    <ul class="aui-list-view">

        <li class="aui-list-view-cell aui-img " onclick="openShopInfo('{{=it.supplier.supplier_id}}')" tapmode class="">

            <img class="aui-img-object aui-pull-left" src="{{=it.supplier.logo}}">

                <div class="aui-ellipsis-1 " style="height: 60px;line-height: 60px;">{{=it.supplier.supplier_name}}</div>
        </li>

    </ul>
</div>
<div class="aui-content">
    <div class="aui-text-center bg-white aui-padded-10 long-under-line"><span class="bg-white z-index99-positon aui-padded-0-10">商品详情</span></div>
<div class="img100">

    <img src="{{=it.goods_img}}" alt="">
    <!--<img src="../image/tese.jpg" alt="">-->
    <!--<img src="../image/tese.jpg" alt="">-->
</div>
</div>
</script>
</body>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/myInfo.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript" src="../script/echo.js"></script>
<script type="text/javascript" src="../script/jquery-1.11.3.js"></script>
<script type="text/javascript" src="../script/aui-slide.js"></script>
<script type="text/javascript">
    var goodId="";
    apiready = function() {
        api.parseTapmode();
        goodId = api.pageParam.goodId;
//        var header = $api.dom('header');
//        $api.fixIos7Bar(header);
        api.setStatusBarStyle({
            style : 'dark'
        });
        getGoodInfo();

    }
    $(function () {

    })
    function slide() {
        var slide3 = new auiSlide({
            container: document.getElementById("aui-slide"),
            // "width":300,
            "height": 240,
            "speed": 500,
            "autoPlay": 3000, //自动播放
            "loop": true,
            "pageShow": true,
            "pageStyle": 'dot',
            'dotPosition': 'center'
        })
    }
    function goToBuyFrm() {

        goToBuy()
    }

    function getGoodInfo() {
        showLoading()
        var url = "goods/info";
        var data = {};
        data["goods_id"] = goodId;
        getStorageAll();
//        alert(JSON.stringify(data))
        ajaxRequest(url, 'get', data, function (ret, err) {
//        alert(JSON.stringify(ret.data.company_name))
            hideLoading();
            var content = $api.byId('goodInfo-content');
            var tpl = $api.byId('goodInfo-template').text;
            var tempFn = doT.template(tpl);
//            if (page > 1) {
//                if (!$.trim(ret.data)) {
//                    return;
//                }
//                $api.append(content, tempFn(ret.data));
//            } else {
//                showNoTip(ret.data);
//
//            }
//            $api.html(content, tempFn(ret.data));

            $(".aui-slide-wrap").html('<div class="aui-slide-node "><img src="'+ret.data.goods_img+'{{=it.goods_img}}" /></div>')



            $api.html(content, '');
            $api.html(content, tempFn(ret.data));
            slide();
        });
    }
</script>
</html>
